export const basicComponents = [
    {
        type: 'input',
        name: '单行文本',
        icon: 'icon-input',
        options: {
            width: '100%',
            defaultValue: '',
            required: false,
            dataType: 'string',
            pattern: '',
            placeholder: ''
        }
    },
    {
        type: 'textarea',
        name: '多行文本',
        icon: 'icon-diy-com-textarea',
        options: {
            width: '100%',
            defaultValue: '',
            required: false,
            disabled: false,
            pattern: '',
            placeholder: ''
        }
    },
    {
        type: 'number',
        name: '计数器',
        icon: 'icon-number',
        options: {
            width: '',
            required: false,
            defaultValue: 0,
            min: '',
            max: '',
            step: 1,
            disabled: false,
            controlsPosition: ''
        }
    },
    {
        type: 'radio',
        name: '单选框组',
        icon: 'icon-radio-active',
        options: {
            inline: false,
            defaultValue: '',
            showLabel: false,
            options: [
                {
                    value: '选项1',
                    label: '选项1'
                },
                {
                    value: '选项2',
                    label: '选项2'
                },
                {
                    value: '选项3',
                    label: '选项3'
                }
            ],
            required: false,
            width: '',
            remote: false,
            remoteOptions: [],
            props: {
                value: 'value',
                label: 'label'
            },
            remoteFunc: ''
        }
    },
    {
        type: 'checkbox',
        name: '多选框组',
        icon: 'icon-check-box',
        options: {
            inline: false,
            defaultValue: [],
            showLabel: false,
            options: [
                {
                    value: '选项1'
                },
                {
                    value: '选项2'
                },
                {
                    value: '选项3'
                }
            ],
            required: false,
            width: '',
            remote: false,
            remoteOptions: [],
            props: {
                value: 'value',
                label: 'label'
            },
            remoteFunc: ''
        }
    },
    {
        type: 'time',
        name: '时间选择器',
        icon: 'icon-time',
        options: {
            defaultValue: '21:19:56',
            readonly: false,
            disabled: false,
            editable: true,
            clearable: true,
            placeholder: '',
            startPlaceholder: '',
            endPlaceholder: '',
            isRange: false,
            arrowControl: true,
            format: 'HH:mm:ss',
            required: false,
            width: ''
        }
    },
    {
        type: 'date',
        name: '日期选择器',
        icon: 'icon-date',
        options: {
            defaultValue: '',
            readonly: false,
            disabled: false,
            editable: true,
            clearable: true,
            placeholder: '',
            startPlaceholder: '',
            endPlaceholder: '',
            type: 'date',
            format: 'yyyy-MM-dd',
            timestamp: false,
            required: false,
            width: ''
        }
    },
    {
        type: 'rate',
        name: '评分',
        icon: 'icon-icon-test',
        options: {
            defaultValue: null,
            max: 5,
            disabled: false,
            readonly: false,
            allowHalf: false,
            required: false
        }
    },
    {
        type: 'color',
        name: '颜色选择器',
        icon: 'icon-color',
        options: {
            defaultValue: '',
            disabled: false,
            showAlpha: false,
            required: false
        }
    },
    {
        type: 'select',
        name: '下拉选择框',
        icon: 'icon-select',
        options: {
            label: '下拉选择框',
            defaultValue: '',
            multiple: false,
            disabled: false,
            clearable: false,
            placeholder: '',
            required: false,
            showLabel: false,
            width: '',
            options: [
                {
                    value: '下拉框1'
                },
                {
                    value: '下拉框2'
                }, {
                    value: '下拉框3'
                }
            ],
            remote: false,
            filterable: false,
            remoteOptions: [],
            props: {
                value: 'value',
                label: 'label'
            },
            remoteFunc: ''
        }
    },
    {
        type: 'switch',
        name: '开关',
        icon: 'icon-switch',
        options: {
            defaultValue: false,
            required: false,
            disabled: false
        }
    },
    {
        type: 'slider',
        name: '滑块',
        icon: 'icon-slider',
        options: {
            defaultValue: 0,
            disabled: false,
            required: false,
            min: 0,
            max: 100,
            step: 1,
            showInput: false,
            range: false,
            width: ''
        }
    },
    {
        type: 'img',
        name: '图片',
        icon: 'icon-tupian',
        options: {
            defaultValue: 'https://avatars2.githubusercontent.com/u/12621342?v=4',
            textAlign: 'center',
            backgroundColor: '#fff',
            borderRadius: '0px',
            width: '50px',
            height: '50px',
            linkType: 'inline',
            linkUrl: '',
            query: ''
        }
    },
    // 链接分为内链和外链（inline/outer）
    {
        type: 'title',
        name: '标题',
        icon: 'icon-input',
        options: {
            defaultValue: '标题',
            inline: false,
            textAlign: 'center',
            color: '#000',
            fontSize: '12px',
            fontWeight: 600,
            marginLeft: '0px',
            marginRight: '0px',
            titleHeight: '',
            lineHeight: '',
            linkType: 'inline',
            linkUrl: '',
            query: ''
        }
    },
    {
        type: 'tag',
        name: '标签',
        icon: 'icon-input',
        options: {
            defaultValue: '标签',
            type: 'success',
            hit: false,
            tagColor: '',
            size: 'small',
            marginLeft: '0px',
            marginRight: '0px',
            linkType: 'inline',
            linkUrl: '',
            query: ''
        }
    },
    {
        type: 'cell',
        name: '单元格',
        icon: 'icon-input',
        options: {
            showHover: false,
            imgType: 'image',
            imgDefaultValue: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1718395925,3485808025&fm=27&gp=0.jpg',
            borderRadius: '0px',
            backgroundColor: '',
            backgroundImage: '',
            imgWidth: '100px',
            imgHeight: '100px',
            iconName: 'icon-search',
            titleDefaultValue: '主标题',
            descDefaultValue: '副标题',
            color: '#000',
            imgMarginRight: '10px',
            marginLeft: '0px',
            marginRight: '0px',
            padding: '0px',
            linkType: 'inline',
            linkUrl: '',
            query: ''
        }
    },
    {
        type: 'icon',
        name: '图标',
        icon: 'icon-input',
        options: {
            iconName: 'icon-search',
            color: '#000',
            fontSize: '12px',
            linkType: 'inline',
            linkUrl: '',
            query: ''
        }
    },
    {
        type: 'button',
        name: '按钮',
        icon: 'icon-input',
        options: {
            defaultValue: '确定',
            type: 'primary',
            size: 'small',
            marginLeft: '0px',
            marginRight: '0px',
            linkType: 'inline',
            linkUrl: '',
            query: ''
        }
    },
    {
        type: 'ninecard',
        name: '九宫格',
        icon: 'icon-input',
        options: {
            defaultValue: '',
            imgDefaultValue: 'https://avatars2.githubusercontent.com/u/12621342?v=4',
            titleDefaultValue: '123',
            linkDefaultValue: '',
            backgroundColor: '#fff',
            borderRadius: '0px',
            textAlign: 'center',
            color: '#000',
            fontSize: '12px',
            fontWeight: 600,
            marginLeft: '0px',
            marginRight: '0px',
            titleHeight: '',
            lineHeight: '',
            inline: false,
            width: '50px',
            height: '50px'
        }
    },
    // 卡片是练习用的
    {
        type: 'card',
        name: '卡片',
        icon: 'icon-input',
        options: {
            titleDefaultValue: '卡片标题',
            width: ' 480px',
            optionButtonName: '操作按钮',
            defaultValue: 3
            // options:3
        }

    },
    {
        type: 'card2',
        name: '卡片2',
        icon: 'icon-input',
        options: {
            titleDefaultValue: '本月入职',
            chioseColor: 'card-box-blue',
            width: '350px',
            cardValue: '￥0.00',
            detailValue: '当月各店铺近出货金额合计（元）',
            defaultValue: ''
        }
    },
    {
        type: 'card3',
        name: '卡片3',
        icon: 'icon-input',
        options: {
            backgroundColor: '#5A8EBE',
            width: '320px',
            height: '200px',
            titleDefaultValue: '测试',
            cardValue: '测试',
            textAlignTitle: 'left',
            textAlign: 'right',
            fontSize: '12px',
            defaultValue: ''
        }

    },
    {
        type: 'card4',
        name: '卡片4',
        icon: 'icon-input',
        options: {
            titleDefaultValue: '本月入职',
            chioseColor: 'card-background-img-blue',
            width: '350px',
            cardValue: '￥0.00',
            detailValue: '当月各店铺近出货金额合计（元）',
            defaultValue: ''
        }
    },
    {
        type: 'card5',
        name: '卡片5',
        icon: 'icon-input',
        options: {
            label: '2019年第四度销售额',
            boxWidth: '350px',
            name: '2019年第四度销售额',
            showTarget: true,
            target: 'F1实现企业价值最大化',
            rule: '财务',
            showRule: true,
            defaultValue: '',
            targetTitle: '目标',
            ruleTitle: '角度',
            options: [
                { value: '', td: [
                    { value: 'td1-1', rowspan: '2', colspan: '1' },
                    { value: 'td1-2', rowspan: '1', colspan: '1' },
                    { value: 'td1-3', rowspan: '1', colspan: '1' }] },
                { value: '', td: [
                    { value: 'td2-2', rowspan: '1', colspan: '1' },
                    { value: 'td2-3', rowspan: '1', colspan: '1' }] },
                { value: '', td: [
                    { value: 'td3-1', rowspan: '1', colspan: '1' },
                    { value: 'td3-2', rowspan: '1', colspan: '1' },
                    { value: 'td3-3', rowspan: '1', colspan: '1' }] }
            ]
        }
    },
    {
        type: 'FM1',
        name: '仿淘宝1',
        icon: 'icon-input',
        options: {
            defaultValue: '',
            titleDefaultValue: '测试',
            detailValue: '￥123',
            noticeValue: '很多人购买',
            imgDefaultValue: 'https://avatars2.githubusercontent.com/u/12621342?v=4'
        }
    },
    {
        type: 'FM2',
        name: '仿淘宝2',
        icon: 'icon-input',
        options: {
            defaultValue: '',
            titleDefaultValue: '测试用的title',
            titleNotice: '材质：222 / 333 /',
            detailValue: '￥123',
            noticeValue: '212人付款',
            detailNotice: '某宝店家',
            imgDefaultValue: 'https://avatars2.githubusercontent.com/u/12621342?v=4'

        }
    },
    {
        type: 'detailTitle',
        name: '标题附横向文本',
        icon: 'icon-input',
        options: {
            title: '编辑中的标题',
            content: '编辑中的文本',
            fontSizeTitle: '14px',
            fontSizeContent: '12px',
            fontWeightTitle: '600',
            colorTitle: '#606266',
            colorContent: '#606266',
            lineHeight: '',
            linkType: 'inline',
            linkUrl: '',
            query: '',
            marginLeft: '0px',
            marginRight: '0px',
            textAlign: 'left',
            inline: false
        }
    }

]

export const advanceComponents = [
    {
        type: 'blank',
        name: '自定义',
        icon: 'icon-ic',
        options: {
            defaultType: 'String'
        }
    },
    {
        type: 'imgupload',
        name: '图片',
        icon: 'icon-tupian',
        options: {
            defaultValue: [],
            size: {
                width: 100,
                height: 100
            },
            width: '',
            tokenFunc: 'funcGetToken',
            token: '',
            domain: 'http://pfp81ptt6.bkt.clouddn.com/',
            disabled: false,
            length: 8,
            multiple: true
        }
    },
    {
        type: 'editor',
        name: '编辑器',
        icon: 'icon-fuwenbenkuang',
        options: {
            defaultValue: '',
            width: ''
        }
    },
    {
        type: 'cascader',
        name: '级联选择器',
        icon: 'icon-jilianxuanze',
        options: {
            defaultValue: [],
            width: '',
            placeholder: '',
            disabled: false,
            clearable: false,
            remote: true,
            remoteOptions: [],
            props: {
                value: 'value',
                label: 'label',
                children: 'children'
            },
            remoteFunc: ''
        }
    }
]

export const layoutComponents = [
    {
        type: 'grid',
        name: '栅格布局',
        icon: 'icon-grid-',
        columns: [
            {
                span: 12,
                list: []
            },
            {
                span: 12,
                list: []
            }
        ],
        options: {
            gutter: 0,
            justify: 'start',
            align: 'top'
        }
    }
]
